
import util from '../../../common/js/util'
import NProgress from 'nprogress'
import axios from 'axios';
import address from "../../../../models/dict/address.js"  //任务字典模块
import moment from 'moment'

import task from "../../../../models/dict/task.js"  //任务字典模块
import array from "../../../../models/comm/array.js"  //数组操作模块
import yz from "../../../../models/comm/yz.js"  //数组操作模块
import Vue from 'vue'

import math from 'mathjs';

import clType from '../../../../models/dict/clothesSizeType'




export default {
    data() {
        return {



            unitArray: task.unitArray(),

            listLoading: false,
            amount: 0,
            completeDoneNum: 0,
            cdeliverDoneNum: 0,
            num: 0



        }
    },
    methods: {


        getSizeName(sizeId) {
            return clType.getSizeName(sizeId)
        },
        count() {
            this.completeDoneNum = 0;
            this.num = 0;
            this.cdeliverDoneNum = 0;

            this.currObj.detail.forEach(function (item) {
                this.completeDoneNum = math.chain(this.completeDoneNum).add(item.completeDoneNum).done()

                this.cdeliverDoneNum = math.chain(this.cdeliverDoneNum).add(item.cdeliverDoneNum).done()
                this.num = math.chain(this.num).add(item.num).done()
            }, this);



        }






    }, 
    mounted() {
        this.count()
    },
    props: {
        currObj: {

        }



    }
}